cmake_minimum_required(VERSION 3.4.1)
project("a3dmodel")
# 指定include目录
include_directories(
        ${PROJECT_ROOT}/app/src/main/cpp/include
)

add_library(assimp SHARED IMPORTED)
set_target_properties(assimp PROPERTIES IMPORTED_LOCATION ${PROJECT_ROOT}/app/src/main/jniLibs/${ANDROID_ABI}/libassimp.so)

add_library(course-one SHARED CourseOne.cpp ShareLoader.cpp)
add_library(course-two SHARED CourseTwo.cpp ShareLoader.cpp SimpleCube.cpp AngleCube.cpp Matrix.cpp)
# 查找log库,将找到的log库声明为log-lib
find_library(log-lib log)
# 将这些libraries打包成动态库
target_link_libraries(
        course-one
        GLESv2
        EGL
        jnigraphics
        ${log-lib})

target_link_libraries(
        course-two
        GLESv2
        EGL
        jnigraphics
        ${log-lib})

add_library(course-three SHARED CourseThree.cpp AssimpModel.cpp)
target_link_libraries(
        course-three
        assimp
        GLESv2
        EGL
        jnigraphics
        ${log-lib})

add_library(assimp-helper SHARED AssimpHelper.cpp)
target_link_libraries(
        assimp-helper
        assimp
        GLESv2
        EGL
        jnigraphics
        ${log-lib})


